import http from "@/utils/request";

// 获取导航栏数据
export const getNavList = (data) => {
  return http({
    url: "/channels",
    method: "get",
    data,
  });
};

// 根据导航栏id获取文章列表
export const getArticleList = (data) => {
  return http({
    url: `/articles?channel_id=${data}&timestamp=${Date.now()}&with_top=1`,
    method: "get",
    data,
  });
};

// 获取文章详情
export const getArticleDetail = (data) => {
  return http({
    url: `/articles/${data}`,
    method: "get",
    data,
  });
};
